package rmicomplex;

import java.rmi.RemoteException;
import java.util.Random;

class unClient extends Thread
{
	private ClientInterface interface_cliente;
	private Random seed;
	
	public unClient(ClientInterface cli)
	{
		interface_cliente = cli;
		seed = new Random();
	}
	
	public void run()
	{
		while (true)
		{
			try{
				sleep(100);
			}
			catch (Exception e){
			};
			
			try{
				interface_cliente.refresh(seed.nextInt(100) );
			}
			
			catch (RemoteException e){
				return;
			}
		}
	}
}